package com.crowdfunding.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaoyu
 * @since 2021-07-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="DreamCrowdfunding对象", description="")
public class DreamCrowdfunding extends Model<DreamCrowdfunding> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "dream_id")
    private String dreamId;

    private String dreamName;

    private String username;

    private String dreamIntroduce;

    private String dreamImage;

    @ApiModelProperty(value = "是否通过认证")
    private Integer dreamAuthentication;

    private Double dreamTotalAmount;

    private Double dreamAlreadyAmount;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dreamCreateTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dreamDeadline;

    private double dreamTag1;

    private double dreamTag2;

    private double dreamTag3;

    private double dreamTag4;


    @ApiModelProperty( value = "状态码：0（待审核）；1（审核成功，发布）；2（众筹结束）")
    private Integer status;

    @TableLogic
    @JsonIgnore
    private Integer deleted;

    @Version
    @JsonIgnore
    private Integer version;


    @Override
    public Serializable pkVal() {
        return this.dreamId;
    }

}
